package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 平台支付订单对象 tcy_platform_order
 *
 * @author ruoyi
 * @date 2025-03-14
 */
public class TcyPlatformOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String outTradeNo;

    /** 门店编号	 */
    @Excel(name = "门店编号	")
    private String merchantCode;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 实收金额 */
    @Excel(name = "实收金额")
    private BigDecimal receiptAmount;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal discountAmount;

    /** 交易完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "交易完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 第三方交易手续费（用于计算商户真实到账金额） */
    @Excel(name = "第三方交易手续费", readConverterExp = "用=于计算商户真实到账金额")
    private BigDecimal feeAmount;

    /** 第三方用户标识(微信支付openid，支付宝支付userid) */
    @Excel(name = "第三方用户标识(微信支付openid，支付宝支付userid)")
    private String buyerId;

    /** 交易状态 */
    @Excel(name = "交易状态")
    private String orderStatus;

    /** 订单备注 */
    @Excel(name = "订单备注")
    private String orderRemark;

    /** 支付渠道 */
    @Excel(name = "支付渠道")
    private String channel;

    /** 支付交易类型 */
    @Excel(name = "支付交易类型")
    private String tradeType;

    /** 消费者用户标识 */
    @Excel(name = "消费者用户标识")
    private String openId;

    /** 微信分配的小程序APPID */
    @Excel(name = "微信分配的小程序APPID")
    private String subAppId;

    /** 订单类型 */
    @Excel(name = "订单类型")
    private String orderType;

    /** 订单来源 */
    @Excel(name = "订单来源")
    private String orderSource;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private String status;

    /** 平台 */
    @Excel(name = "平台")
    private String platform;

    /** 开票状态（0未提交 1正在开票中 2已开票） */
    @Excel(name = "开票状态")
    private String kaipiaoStatus;

    @Excel(name = "车牌号码")
    private String carNum;


    @Excel(name = "第三方支付订单号")
    private String payOrderId;


    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    public String getPayOrderId() {
        return payOrderId;
    }

    public void setPayOrderId(String payOrderId) {
        this.payOrderId = payOrderId;
    }

    public String getKaipiaoStatus() {
        return kaipiaoStatus;
    }

    public void setKaipiaoStatus(String kaipiaoStatus) {
        this.kaipiaoStatus = kaipiaoStatus;
    }




    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOutTradeNo(String outTradeNo)
    {
        this.outTradeNo = outTradeNo;
    }

    public String getOutTradeNo()
    {
        return outTradeNo;
    }
    public void setMerchantCode(String merchantCode)
    {
        this.merchantCode = merchantCode;
    }

    public String getMerchantCode()
    {
        return merchantCode;
    }
    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }
    public void setReceiptAmount(BigDecimal receiptAmount)
    {
        this.receiptAmount = receiptAmount;
    }

    public BigDecimal getReceiptAmount()
    {
        return receiptAmount;
    }
    public void setDiscountAmount(BigDecimal discountAmount)
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount()
    {
        return discountAmount;
    }
    public void setPayTime(Date payTime)
    {
        this.payTime = payTime;
    }

    public Date getPayTime()
    {
        return payTime;
    }
    public void setFeeAmount(BigDecimal feeAmount)
    {
        this.feeAmount = feeAmount;
    }

    public BigDecimal getFeeAmount()
    {
        return feeAmount;
    }
    public void setBuyerId(String buyerId)
    {
        this.buyerId = buyerId;
    }

    public String getBuyerId()
    {
        return buyerId;
    }
    public void setOrderStatus(String orderStatus)
    {
        this.orderStatus = orderStatus;
    }

    public String getOrderStatus()
    {
        return orderStatus;
    }
    public void setOrderRemark(String orderRemark)
    {
        this.orderRemark = orderRemark;
    }

    public String getOrderRemark()
    {
        return orderRemark;
    }
    public void setChannel(String channel)
    {
        this.channel = channel;
    }

    public String getChannel()
    {
        return channel;
    }
    public void setTradeType(String tradeType)
    {
        this.tradeType = tradeType;
    }

    public String getTradeType()
    {
        return tradeType;
    }
    public void setOpenId(String openId)
    {
        this.openId = openId;
    }

    public String getOpenId()
    {
        return openId;
    }
    public void setSubAppId(String subAppId)
    {
        this.subAppId = subAppId;
    }

    public String getSubAppId()
    {
        return subAppId;
    }
    public void setOrderType(String orderType)
    {
        this.orderType = orderType;
    }

    public String getOrderType()
    {
        return orderType;
    }
    public void setOrderSource(String orderSource)
    {
        this.orderSource = orderSource;
    }

    public String getOrderSource()
    {
        return orderSource;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setPlatform(String platform)
    {
        this.platform = platform;
    }

    public String getPlatform()
    {
        return platform;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("outTradeNo", getOutTradeNo())
            .append("merchantCode", getMerchantCode())
            .append("totalAmount", getTotalAmount())
            .append("receiptAmount", getReceiptAmount())
            .append("discountAmount", getDiscountAmount())
            .append("payTime", getPayTime())
            .append("feeAmount", getFeeAmount())
            .append("buyerId", getBuyerId())
            .append("orderStatus", getOrderStatus())
            .append("orderRemark", getOrderRemark())
            .append("channel", getChannel())
            .append("tradeType", getTradeType())
            .append("openId", getOpenId())
            .append("subAppId", getSubAppId())
            .append("orderType", getOrderType())
            .append("orderSource", getOrderSource())
            .append("status", getStatus())
            .append("platform", getPlatform())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("kaipiaoStatus", getKaipiaoStatus())
            .append("carNum", getCarNum())
            .append("payOrderId", getPayOrderId())

            .toString();
    }
}
